import logging,yagmail,requests,os,yaml

def log():
    logging.basicConfig(filename='log.txt',filemode='a+',level=logging.DEBUG,datefmt='%(asctime)->%(levenme)->%(message)')


def sadf(filename):
    email=yagmail.SMTP(user='1038995773@qq.com',password='pahznimdvxdtbegi',host='smtp.qq.com')
    email.send(to='1038995773@qq.com',subject='测试报告',contents='测试结果',attachments=filename)

def read(file):
    with open(file,'r',encoding='utf-8')as e:
        return yaml.safe_load(e)

